home *** CD-ROM | disk | FTP | other *** search
/ Run Magazine ReRun: Game Pak / rerun-gamepak / chopper run (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  6KB  |  182 lines

  1. 100 rem ******************************
  2. 110 rem *      chopper run           *
  3. 115 rem *                            *
  4. 120 rem *   written by h. campbell   *
  5. 130 rem *                            *
  6. 140 rem ******************************
  7. 150 :
  8. 160 :
  9. 165 poke53281,0 :poke53280,0
  10. 170 gosub20000
  11. 200 v=53248  : rem v=vicii starting address
  12. 202 s=54272 : rem s=sid starting address
  13. 204 dn$="[155]^":sr$=""
  14. 210 fori=stos+24:pokei,0:next : rem clear sid
  15. 220 mx=0
  16. 230 fori=1009to1013:reada:pokei,a:next
  17. 235 data0,0,3,1,2
  18. 242 ::fori=828to991:reada:pokei,a:nexti : rem poke ml joystick reader
  19. 243 ::fori=0to319
  20. 244 ::reada: rem get sprite data
  21. 245 ::pokei+12288,a : rem place data at 12288 on
  22. 246 ::nexti
  23. 247 print"[147][158]do you want details?  y[146]es or n[146]o":poke198,0
  24. 248 geta$:ifa$<>"y"anda$<>"n"then248
  25. 249 ifa$="y"thengosub30000
  26. 250 poke2040,192 : rem point sprite 0 data pointer to 12288
  27. 251 gosub 1000
  28. 252 sc=0:ch=0:ct=0:di=0:hi=0
  29. 254 pokes+1,8 : pokes+6,128 : pokes+24,15
  30. 270 pokev+39,6 : rem set sprite 0 color
  31. 272 pokev+37,1  : rem multi-color 1
  32. 273 pokev+38,15 : rem multi-color 2
  33. 275 poke53276,3 : rem set mobs to multi-color
  34. 280 pokev+1,200 : pokev,155 : pokev+16,0
  35. 281 pokev+2,120 : pokev+3,255
  36. 282 poke2041,196 : rem point sprite 1 data pointer
  37. 283 pokev+40,10 : rem set sprite 1 color
  38. 284 a=peek(v+31) : rem clear spr/chr collision register
  39. 285 a=peek(v+30) : rem clear spr/spr collision register
  40. 286 pokev+21,3 : rem turn on sprites
  41. 288 sys 937
  42. 294 print"[147]";:gosub500
  43. 295 pokes+24,0 : pokev+21,0
  44. 300 print"[147]distance[158]"di
  45. 302 ifdi>mxthenmx=di
  46. 305 printspc(20)"[145]max. dist[158]"mx
  47. 310 print"would you like to play again?"
  48. 320 input"  y[157][157][157]";a$
  49. 330 ifa$="y"then250
  50. 340 print"[147]";:end
  51. 400 run
  52. 410 :
  53. 420 :
  54. 500 rem ////////////////
  55. 510 rem / main routine /
  56. 520 rem ////////////////
  57. 530 :
  58. 534 ic=.005
  59. 535 s1=129:s0=128:po=218:pe=143:f=2
  60. 536 di$="distance[158]":sc$="[157][148]"
  61. 540 print"[147][149][209][209] [209][145] [209][209]    [209][209][209]    [209][209]      [209][209][209][145][145][209][209]   [209][209][145][209] [145][145][145][209][209]"
  62. 542 print"                     [209][145][145]"
  63. 545 print"[209]   [209]    [145][145][145][145][145][145][209]     [209]    [209]     [145][145][145][145][145][145][209]         [209]"
  64. 550 pokes+4,s1:di=di+sp
  65. 560 fori=1tosk:next
  66. 575 ifpeek(v+30)thengosub940:return
  67. 580 pokes+4,s0:printdi$;di;sc$:pokepo,pe
  68. 610 cl=peek(v+31):if(cland1)=1thengosub900:return
  69. 615 ifclthenpoke2041,0:pokev+3,255:poke2041,196
  70. 635 pokev+3,peek(v+3)-f:f=f+ic:ifpeek(v+3)<25thenpokev+3,255
  71. 638 ifpeek(v+1)<55thengosub940:return
  72. 640 goto 550
  73. 650 :
  74. 900 rem //////////////////////////////
  75. 910 rem / mob/mob collision response /
  76. 920 rem //////////////////////////////
  77. 930 :
  78. 940 poke985,0
  79. 950 pokes+1,2:pokes+4,129
  80. 955 fori=1to300:nexti
  81. 958 poke985,192
  82. 960 return
  83. 970 :
  84. 1000 rem ///////////////
  85. 1010 rem / skill level /
  86. 1020 rem ///////////////
  87. 1030 :
  88. 1040 print"[147]press the desired skill level number."
  89. 1050 print"0 = hardest ; 5 = easiest" : poke198,0
  90. 1060 geta$:ifa$=""then1060
  91. 1070 sk=val(a$):ifsk>5then1060
  92. 1075 sp=6-sk
  93. 1080 sk=sk*10
  94. 1090 return
  95. 1100 :
  96. 2000 rem ///////////////////////////
  97. 2010 rem / ml joystick reader data /
  98. 2020 rem ///////////////////////////
  99. 2030 :
  100. 2040 data173,0,220,74,176,3,206,1,208,74,176,3,238,1,208,74,176,42,173,0,208,208
  101. 2041 data31,173,16,208,41,1,208,16,173,16,208,9,1,141,16,208,169,80,141,0,208,76
  102. 2042 data182,3,173,16,208,41,252,141,16,208,206,0,208,76,182,3,74,176,32,238,0,208
  103. 2043 data240,30,169,80,205,0,208,208,20,173,16,208,41,1,240,13,173,16,208,41,252
  104. 2044 data141,16,208,169,0,141,0,208,76,182,3,173,16,208,9,1,141,16,208,76,182,3,120
  105. 2045 data169,60,141,20,3,169,3,141,21,3,88,96,173,16,208,41,1,240,5,9,2,141,16,208
  106. 2046 data173,0,208,141,2,208,173,241,3,24,105,1,41,3,141,241,3,170,189,242,3,24,105
  107. 2047 data192,141,248,7,76,49,234
  108. 2120 :
  109. 9000 rem ///////////////
  110. 9010 rem / sprite data /
  111. 9020 rem ///////////////
  112. 9030 :
  113. 9031 data000,000,000,000,016,000,000,084
  114. 9032 data000,000,084,000,000,168,000,002
  115. 9033 data170,000,255,255,252,002,170,000
  116. 9034 data002,170,000,000,168,000,000,032
  117. 9035 data000,000,032,000,000,032,000,000
  118. 9036 data032,000,000,032,000,000,032,000
  119. 9037 data003,032,000,003,160,000,003,000
  120. 9038 data000,000,000,000,000,000,000,006
  121. 9039 data000,000,000,000,048,000,000,116
  122. 9040 data000,000,116,000,000,184,000,002
  123. 9041 data186,000,002,186,000,002,186,000
  124. 9042 data002,186,000,000,184,000,000,048
  125. 9043 data000,000,048,000,000,032,000,000
  126. 9044 data032,000,000,032,000,000,032,000
  127. 9045 data003,032,000,003,160,000,003,000
  128. 9046 data000,000,000,000,000,000,000,006
  129. 9047 data000,000,000,192,016,000,048,084
  130. 9048 data000,012,084,000,003,168,000,002
  131. 9049 data234,000,002,186,000,002,174,000
  132. 9050 data002,171,000,000,168,192,000,032
  133. 9051 data048,000,032,012,000,032,000,000
  134. 9052 data032,000,000,032,000,000,032,000
  135. 9053 data003,032,000,003,160,000,003,000
  136. 9054 data000,000,000,000,000,000,000,006
  137. 9063 data000,000,000,000,016,012,000,084
  138. 9064 data048,000,084,192,000,171,000,002
  139. 9065 data174,000,002,186,000,002,234,000
  140. 9066 data003,168,000,012,168,000,048,032
  141. 9067 data000,192,032,000,000,032,000,000
  142. 9068 data032,000,000,032,000,000,032,000
  143. 9069 data003,032,000,003,160,000,003,000
  144. 9070 data000,000,000,000,000,000,000,006
  145. 9071 data032,000,000,168,000,000,168,000
  146. 9072 data000,032,000,000,032,000,000,032
  147. 9073 data000,000,032,000,000,168,000,000
  148. 9074 data168,000,000,136,000,000,184,000
  149. 9075 data000,048,000,000,048,000,000,048
  150. 9076 data000,000,000,000,000,000,000,000
  151. 9077 data000,000,000,000,000,000,000,000
  152. 9078 data000,000,000,000,000,000,000,255
  153. 20000 rem //////////////
  154. 20005 rem / title page /
  155. 20010 rem //////////////
  156. 20015 :
  157. 20020 print"[147]"spc(13)"[158]chopper run"
  158. 20030 printspc(10)"by howard campbell"
  159. 20040 return
  160. 20050 :
  161. 30000 rem ////////////////
  162. 30002 rem / objective  ///
  163. 30004 rem ////////////////
  164. 30005 :
  165. 30009 print"[147][158]you are the pilot of a reconnaissance
  166. 30010 [153]"chopper trapped behind enemy lines.
  167. 30020 print"to evade certain destruction you must
  168. 30030 [153]"fly less than ten feet off the ground.
  169. 30040 print"you will have to avoid various ground
  170. 30050 [153]"projections or face the possiblility of
  171. 30060 print"crashing.
  172. 30070 [153]"you must evade heat-seeking missiles,"
  173. 30080 [153]"which are constantly launched to inter-"
  174. 30090 [153]"cept you.  the only certain way to shake";
  175. 30100 [153]"these missiles off your tail is to force";
  176. 30110 [153]"them to strike a ground projection.
  177. 30120 print"place joystick in port 2 to control your chopper.
  178. 30140 [153]"             printgood luck!!!wait
  179. 30150 print"       [158]press <space> to continue[146]";
  180. 30160 geta$:ifa$=""then30160
  181. 30170 return
  182.